import { Tabs } from 'antd';
import style from '../css/Patientfilingstatistics.module.scss'
import { TabsProps } from 'antd/lib';
import { Outlet, useNavigate } from 'react-router';
import { useEffect } from 'react';
function Patientfilingstatistics() {
    // 编程式导航
    const navigate = useNavigate()
    useEffect(()=>{
        navigate('/index/statisticsquery/Patientfilingstatistics/Archivesummary')
    },[])
    // 标签页导航
    const onChange = (key: string) => {
        console.log(key);
        if(key=='1'){
            navigate('/index/statisticsquery/Patientfilingstatistics/Archivesummary')
        }else{
            navigate('/index/statisticsquery/Patientfilingstatistics/Archivedetails')
        }
    };
        
    const items: TabsProps['items'] = [
        {
            key: '1',
            label: '建档汇总',
        },
        {
            key: '2',
            label: '建档明细',
        },
    ];
    return ( 
        <>
            <div className={style.Patientfiling}>
                <div className={style.title}>
                    <Tabs className={style.tabs} defaultActiveKey="1" items={items} onChange={onChange} />
                </div>
                <div className={style.content}>
                    <Outlet></Outlet>
                </div>
            </div>
        </>
     );
}

export default Patientfilingstatistics;